//
//  MVCollectionViewCell.m
//  23-QQ音乐MV作业讲解
//
//  Created by mafeng on 16/8/15.
//  Copyright © 2016年 mafeng. All rights reserved.
//

#import "MVCollectionViewCell.h"
#import "MVConllectionList.h"
#import "UIImageView+WebCache.h"

@implementation MVCollectionViewCell
-(void)setMvConllectionList:(MVConllectionList *)mvConllectionList {
    _mvConllectionList = mvConllectionList;
    NSString *songAndSinger = [mvConllectionList.mvtitle stringByAppendingFormat:@" - %@", mvConllectionList.singername];
    _songName.text = songAndSinger;
    _descLabel.text = mvConllectionList.mvdesc;
    
    if (mvConllectionList.picurl.length != 0) {
        [_imageViewPic sd_setImageWithURL:[NSURL URLWithString:mvConllectionList.picurl]];
    } else {
        NSString *imageUrl = [NSString stringWithFormat:@" http://shp.qpic.cn/qqvideo_ori/0/%@_360_204/0?max_age=259200", mvConllectionList.vid];
        [_imageViewPic sd_setImageWithURL:[NSURL URLWithString:imageUrl]];
    }
    
}


@end
